/**
 * Created by wangyn on 2017/6/26.
 */
import send from '../http'
export default {
  /**
   * 获取机器人基本信息
   * @param data
   * @returns {*}
   */
  robotInformationSel (data) {
    let req = {
      data: data,
      action: 'config.robot.robotInformationSel'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 修改机器人基本信息 common:是否开启寒暄库
   * @param data
   * @returns {*}
   */
  robotInformation (data) {
    let req = {
      data: data,
      action: 'config.robot.robotInformation'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 获取数据库问答类型
   * @param data
   * @returns {*}
   */
  queryQustionType (data) {
    let req = {
      data: data,
      action: 'config.robot.queryQustionType'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 添加问答分类
   * @param data
   * @returns {*}
   */
  addQuesType (data) {
    let req = {
      data: data,
      action: 'config.robot.addQuesType'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 删除分类
   * @param data
   * @returns {*}
   */
  delQuesType (data) {
    let req = {
      data: data,
      action: 'config.robot.delQuesType'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 查询问题答案列表
   * @param data
   * @returns {*}
   */
  queryQuestions (data) {
    let req = {
      data: data,
      action: 'config.robot.queryQuestions'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 添加问答,添加完应该刷新一下右侧.
   * @param data
   * @returns {*}
   */
  addQuestion (data) {
    let req = {
      data: data,
      action: 'config.robot.addQuestion'
    }
    return send.fetch(req, 'post')
  },
  updateQuesType (data) {
    let req = {
      data: data,
      action: 'config.robot.updateQuesType'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 查询具体问答,用于回显
   * @param data
   * @returns {*}
   */
  getQuestionById (data) {
    let req = {
      data: data,
      action: 'config.robot.getQuestionById'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 修改某个问答, 修改后应该刷新右侧
   * @param data
   * @returns {*}
   */
  updateQuestion (data) {
    let req = {
      data: data,
      action: 'config.robot.updateQuestion'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 查询智能学习列表
   * @param data
   * @returns {*}
   */
  intelligentStudyQuerys (data) {
    let req = {
      data: data,
      action: 'config.robot.intelligentStudyQuerys'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 查询单个智能学习问答
   * @param data
   * @returns {*}
   */
  getStudyQuestionById (data) {
    let req = {
      data: data,
      action: 'config.robot.getStudyQuestionById'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 查询上下文
   * @param data
   * @returns {*}
   */
  queryQuestionAnswerDetail (data) {
    let req = {
      data: data,
      action: 'config.robot.queryQuestionAnswerDetail'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 忽略可能问法
   * @param data
   * @returns {*}
   */
  ignoreQuestion (data) {
    let req = {
      data: data,
      action: 'config.robot.ignoreQuestion'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 关联可能问法
   * @param data
   * @returns {*}
   */
  passQuestion (data) {
    let req = {
      data: data,
      action: 'config.robot.passQuestion'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 查询未知学习列表
   * @param data
   * @returns {*}
   */
  unknownStudyQueryQuestions (data) {
    let req = {
      data: data,
      action: 'config.robot.unknownStudyQueryQuestions'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 忽略未知学习中的一条
   * @param data
   * @returns {*}
   */
  unknownStudyIgnore (data) {
    let req = {
      data: data,
      action: 'config.robot.unknownStudyIgnore'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 未知学习问题的关联
   * @param data
   * @returns {*}
   */
  unknownRelevanceQuestion (data) {
    let req = {
      data: data,
      action: 'config.robot.unknownRelevanceQuestion'
    }
    return send.fetch(req, 'post')
  },

  /**
   * 从一条未知学习添加一个问答
   * @param data
   * @returns {*}
   */
  addUnknowQuestion (data) {
    let req = {
      data: data,
      action: 'config.robot.addUnknowQuestion'
    }
    return send.fetch(req, 'post')
  },
  deleteQuestion (data) {
    let req = {
      data: data,
      action: 'config.robot.deleteQuestion'
    }
    return send.fetch(req, 'post')
  },
  moveQuestion (data) {
    let req = {
      data: data,
      action: 'config.robot.moveQuestion'
    }
    return send.fetch(req, 'post')
  },
  activeQuestion (data) {
    let req = {
      data: data,
      action: 'config.robot.activeQuestion'
    }
    return send.fetch(req, 'post')
  },
  disabledQuestion (data) {
    let req = {
      data: data,
      action: 'config.robot.disabledQuestion'
    }
    return send.fetch(req, 'post')
  },
  exportQuestion (data) {
    let req = {
      data: data,
      action: 'config.robot.exportQuestion'
    }
    return send.fetch(req, 'post')
  },
  getRobotXlsHeads (data) {
    let req = {
      data: data,
      action: 'config.robot.getXlsHeads'
    }
    return send.fetch(req, 'post')
  },
  importRobotQuestion (data) {
    let req = {
      data: data,
      action: 'config.robot.import'
    }
    return send.fetch(req, 'post')
  },
  relevanceStudyQuestion (data) {
    let req = {
      data: data,
      action: 'config.robot.relevanceStudyQuestion'
    }
    return send.fetch(req, 'post')
  },
  addStudyQuestion (data) {
    let req = {
      data: data,
      action: 'config.robot.addStudyQuestion'
    }
    return send.fetch(req, 'post')
  },
  queryUserDictionary (data) {
    let req = {
      data: data,
      action: 'config.robot.queryUserDictionary'
    }
    return send.fetch(req, 'post')
  },
  addUserDictionary (data) {
    let req = {
      data: data,
      action: 'config.robot.addUserDictionary'
    }
    return send.fetch(req, 'post')
  },
  deleteUserDictionary (data) {
    let req = {
      data: data,
      action: 'config.robot.deleteUserDictionary'
    }
    return send.fetch(req, 'post')
  },
  updateUserDictionary (data) {
    let req = {
      data: data,
      action: 'config.robot.updateUserDictionary'
    }
    return send.fetch(req, 'post')
  },
  queryRobotConfig (data) {
    let req = {
      data: data,
      action: 'config.channel.queryRobotConfig'
    }
    return send.fetch(req, 'post')
  },
  m7AiRobotLogin (data) {
    let req = {
      data: data,
      action: 'config.robot.m7AIRobotLogin'
    }
    return send.fetch(req, 'post')
  },
  queryM7AIRobot (data) {
    let req = {
      data: data,
      action: 'config.robot.queryRobot'
    }
    return send.fetch(req, 'post')
  },
  xbotRobotConfig (data) {
    let req = {
      data: data,
      action: 'config.robot.xbotLogin'
    }
    return send.fetch(req, 'post')
  },
  xbotCreateAccount (data) {
    let req = {
      data: data,
      action: 'config.robot.xbotCreateAccount'
    }
    return send.fetch(req, 'post')
  },
  m7RiskLogin (data) {
    let req = {
      data: data,
      action: 'config.risk.m7RiskLogin'
    }
    return send.fetch(req, 'post')
  }
}
